/// Used to get mission parameters, default values, etc. to avoid spamming with global variables.

//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "tools\fn_getFrameworkValue.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_name","_default","_result","_framework_values"];
DEFAULT_PARAM(_name,0,"");
DEFAULT_PARAM(_default,1,nil);
_result = _default;
if (_name != "") then {
	_framework_values = OGETVAR(GVAR(mission_store),"__FRAMEWORK_VALUES__",(call CFUNC(hashEmpty)));
	_result = [_framework_values,_name,_default] call CFUNC(hashGet);
};

TRACE("End");
TMFPROFILERSTOP;
_result;